package com.ice.work.moment.crawler.dao.comment;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ice.work.moment.facade.crawler.model.Comment;
import com.ice.work.moment.facade.crawler.model.Trading;
import org.springframework.stereotype.Repository;

/**
 * @Description Comment dao
 * @Author DELL
 * @Create 2019-01-10
 * @Since 1.0.0
 */
@Repository
public class CommentRepository extends ServiceImpl<ICommentMapper, Comment> implements ICommentRepository {


    @Override
    public Comment findByShareIdAndCommentAtAndDataStatus(Comment comment) {
        return this.baseMapper.selectOne(new QueryWrapper<Comment>().lambda().eq(Comment::getShareId, comment.getShareId()).eq(Comment::getDataStatus, comment.getDataStatus()).eq(Comment::getCommentAt,comment.getCommentAt()));
    }
}


